<h4>用户中心</h4>
<?php
if (isset($_COOKIE['Token'])) {
    echo '当前的Token值：' . $_COOKIE['Token'] . '<br>';
}
?>
<form method="post" action="fileOK.php">
    上传头像：<input type="file" name="via" id="file" onchange="preview();" >
    <img src="" id="imgid">
    <br>
    <input type="submit" value="提交">
</form>
<script>
    function preview() {
        var inputobj = document.getElementById('file');
        var URL = window.URL || window.webkitURL;
        var imgURL = URL.createObjectURL(inputobj.files[0]);
        document.getElementById('imgid').src = imgURL;
    }
</script>
<?php


?>